<?php require 'inc_header.tpl.php';?>

<!-- slider -->
<div class="rj-slider">
	<!-- slider 帧 -->	
    <div class="swiper-container">
        <div class="swiper-wrapper">
            <?php
            foreach($slider as $row){
            ?>
            <div class="swiper-slide"><a href="<?php echo $row['url'];?>">
                <img width="100%" src="<?php if($row['slider_img']){ echo $row['slider_img'];}else{ echo _MODULE_URL_.'/view/resource/image/default_pic_rect.jpg';}?>" title="<?php echo $row['name'];?>" loading="lazy">
            </a></div>
            <?php
            }
            ?>
        </div>
    </div>
	<!-- slider  帧 -->	
    <link rel="stylesheet" href="<?php echo _MODULE_URL_;?>/view/resource/swiper/css/swiper.min.css">
    <script src="<?php echo _MODULE_URL_;?>/view/resource/swiper/js/swiper.min.js"></script>
    <script>
    var swiper = new Swiper('.swiper-container',{
        loop:true,
        autoplay:true,
    });
    </script>
</div>
<!--slider 切换 end -->
       
<!-- 中间  -->
<div class="clear rj-content">
	<!--  文章分类 -->
    <?php 
    foreach($article as $row){
    ?>
        <div class="rj-article-list">
            <h5><span><?php echo $row['sort_name']?></span></h5>
            <ul>
            <?php
            foreach($row['article'] as $row2){
            ?>
                <li><a href="<?php echo url([ _MODULE_NAME_ ,'article','article_detail'],['id'=>$row2['id']]);?>"  target='_blank' title="<?php echo $row2['title']?>"><?php echo $row2['title']?></a></li>
            <?php
            }
            ?>
            <li class="more"><a href="<?php echo url([ _MODULE_NAME_ ,'article','article_list'],['sort_id'=>$row['sort_id']]);?>" target='_blank' title=''>更多..</a></li>
            </ul>
        </div>
    <?php
    }
    ?> 
	
	<br class="clear">
        
    <!--  推荐产品 -->
    <div class="rj-product-list">
        <h5><span>推荐产品</span></h5>
        <?php 
        foreach($goods as $row){
        ?>
            <div>
                <a href="<?php echo url([ _MODULE_NAME_ ,'goods','goods_detail'],['id'=>$row['id']]);?>">
                    <img src="<?php if($row['goods_img']){ echo $row['goods_img'];}else{ echo _MODULE_URL_.'/view/resource/image/default_pic_rect.jpg';}?>" width="180" height="174" loading="lazy" />
                    <br><?php echo $row['goods_name'];?></a>
            </div>
        <?php
        }
        ?>
            
        <br class="clear">
    </div>
        
    <div class="clear rj-friendlink">
        <span>友情链接</span>
        <?php 
        foreach($friendlink as $row){
        ?>
            <a href='<?php echo $row['url'];?>' target='_blank' title='<?php echo $row['tip'];?>'><?php echo $row['name'];?></a> &nbsp; 
        <?php
        }
        ?>                        
    </div>


    <br class="clear">    
</div>

<?php require 'inc_footer.tpl.php';?>